#include<stdio.h>
int main()
{
    int a=0,b=0,k=0;
	scanf("%d:%d %d",&a,&b,&k);
	a=(a*60+b+k)/60%24;
	b=(b+k)%60; 
	printf("%0.2d:%0.2d",a,b);
    return 0;
}

